package com.test.burnincash.aaahpoppomelo.base;

import android.text.TextUtils;

import com.test.burnincash.aaahpoppomelo.util.http_hpoppomelo.HttpManager_hpoppomelo;
import com.test.burnincash.aaahpoppomelo.util.http_hpoppomelo.HttpPresenter_hpoppomelo;
import com.test.burnincash.activity_fragment_burnin.base_burnin.BaseActivity_burnin;

public class BaseActivity_hpoppomelo extends BaseActivity_burnin {

    @Override
    public void recordPagePauseEvent_burnin() {
        //保存埋点
        String activityName = getClass().getSimpleName();
        if (!TextUtils.isEmpty(activityName)) {
            HttpManager_hpoppomelo.getInstance().saveUserBuriedPoint((activityName + "_END").toUpperCase());
        }
    }

    @Override
    public void recordPageResumeEvent_burnin() {
        //保存埋点
        String activityName = getClass().getSimpleName();
        if (!TextUtils.isEmpty(activityName)) {
            HttpManager_hpoppomelo.getInstance().saveUserBuriedPoint((activityName + "_START").toUpperCase());
        }
    }

    @Override
    protected void onResume() {
        super.onResume();
        HttpPresenter_hpoppomelo.getInstance().setActivity(this);
    }

    @Override
    protected void onPause() {
        super.onPause();
        HttpPresenter_hpoppomelo.getInstance().setActivity(null);
    }

}
